<%@ page language="java" 
         import="model.UserBean"
         import="java.io.*"
         import="java.util.*"
         %>

<div id="header">
    <div id="logo"><h1>Virtual Walks</h1><!--a href="index.htm"><img src="images/logo.gif" title="Virtual Walks" alt="Virtual Walks" /></a--></div>

    <!-- Search -->
    <!--div id="search">
        <div class="button-search"><span><span>Search</span></span></div>
        <a id="searchInput" href="searchevent.htm">Search</a>
        <!--input id="searchInput" type="text" name="filter_name" value="Search" onclick="this.value = '';" onkeydown="this.style.color = '#000000';" /-->
        
    </div-->
    <!-- Welcome-->
    <div id="welcome">
        <%
            Enumeration enames;

            enames = session.getAttributeNames();

            if (!enames.hasMoreElements()) {%>
        Welcome visitor you can <a href="signin.htm">login</a> or <a href="signup.htm">create an account</a>.			    			
        <%}
        else{
                        UserBean currentUser = (UserBean)(session.getAttribute("currentSessionUser"));
        %>
        <% if(currentUser.isValid())  {%>
        Welcome <%= currentUser.getFirstName() + " " + currentUser.getLastName() %> <a href="account.htm">My Account</a> , <a href="logout.htm">Log out</a>
        <%  } }  %>
    
    </div>
    <!-- links -->
</div>